home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XrmGetFileDatabase.z / XrmGetFileDatabase
Encoding:
Text File  |  1998-10-30  |  11.2 KB  |  265 lines

  1.  
  2.  
  3.  
  4.      XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XrmGetFileDatabase, XrmPutFileDatabase,
  10.           XrmGetStringDatabase, XrmLocaleOfDatabase, XrmGetDatabase,
  11.           XrmSetDatabase, XrmDestroyDatabase - retrieve and store
  12.           resource databases
  13.  
  14.      SSSSYYYYNNNNTTTTAAAAXXXX
  15.           XrmDatabase XrmGetFileDatabase(_f_i_l_e_n_a_m_e)
  16.                char *_f_i_l_e_n_a_m_e;
  17.  
  18.           void XrmPutFileDatabase(_d_a_t_a_b_a_s_e, _s_t_o_r_e_d__d_b)
  19.                XrmDatabase _d_a_t_a_b_a_s_e;
  20.                char *_s_t_o_r_e_d__d_b;
  21.  
  22.           XrmDatabase XrmGetStringDatabase(_d_a_t_a)
  23.                char *_d_a_t_a;
  24.  
  25.           char *XrmLocaleOfDatabase(_d_a_t_a_b_a_s_e)
  26.                 XrmDatabase _d_a_t_a_b_a_s_e;
  27.  
  28.           XrmDatabase XrmGetDatabase(_d_i_s_p_l_a_y)
  29.                 Display *_d_i_s_p_l_a_y;
  30.  
  31.           void XrmSetDatabase(_d_i_s_p_l_a_y, _d_a_t_a_b_a_s_e)
  32.                 Display *_d_i_s_p_l_a_y;
  33.                 XrmDatabase _d_a_t_a_b_a_s_e;
  34.  
  35.           void XrmDestroyDatabase(_d_a_t_a_b_a_s_e)
  36.                 XrmDatabase _d_a_t_a_b_a_s_e;
  37.  
  38.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  39.           _f_i_l_e_n_a_m_e  Specifies the resource database file name.
  40.  
  41.           _d_a_t_a_b_a_s_e  Specifies the database that is to be used.
  42.  
  43.           _s_t_o_r_e_d__d_b Specifies the file name for the stored database.
  44.  
  45.           _d_a_t_a      Specifies the database contents using a string.
  46.  
  47.           _d_a_t_a_b_a_s_e  Specifies the resource database.
  48.  
  49.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  50.  
  51.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  52.           The _X_r_m_G_e_t_F_i_l_e_D_a_t_a_b_a_s_e function opens the specified file,
  53.           creates a new resource database, and loads it with the
  54.           specifications read in from the specified file.  The
  55.           specified file should contain a sequence of entries in valid
  56.           ResourceLine format (see section 15.1); the database that
  57.           results from reading a file with incorrect syntax is
  58.           implementation-dependent.  The file is parsed in the current
  59.           locale, and the database is created in the current locale.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           If it cannot open the specified file, _X_r_m_G_e_t_F_i_l_e_D_a_t_a_b_a_s_e
  75.           returns NULL.
  76.  
  77.           The _X_r_m_P_u_t_F_i_l_e_D_a_t_a_b_a_s_e function stores a copy of the
  78.           specified database in the specified file.  Text is written
  79.           to the file as a sequence of entries in valid ResourceLine
  80.           format (see section 15.1).  The file is written in the
  81.           locale of the database.  Entries containing resource names
  82.           that are not in the Host Portable Character Encoding or
  83.           containing values that are not in the encoding of the
  84.           database locale, are written in an implementation-dependent
  85.           manner.  The order in which entries are written is
  86.           implementation-dependent.  Entries with representation types
  87.           other than ``String'' are ignored.
  88.  
  89.           The _X_r_m_G_e_t_S_t_r_i_n_g_D_a_t_a_b_a_s_e function creates a new database and
  90.           stores the resources specified in the specified null-
  91.           terminated string.  _X_r_m_G_e_t_S_t_r_i_n_g_D_a_t_a_b_a_s_e is similar to
  92.           _X_r_m_G_e_t_F_i_l_e_D_a_t_a_b_a_s_e except that it reads the information out
  93.           of a string instead of out of a file.  The string should
  94.           contain a sequence of entries in valid ResourceLine format
  95.           (see section 15.1) terminated by a null character; the
  96.           database that results from using a string with incorrect
  97.           syntax is implementation-dependent.  The string is parsed in
  98.           the current locale, and the database is created in the
  99.           current locale.
  100.  
  101.           If database is NULL, _X_r_m_D_e_s_t_r_o_y_D_a_t_a_b_a_s_e returns immediately.
  102.  
  103.           The _X_r_m_L_o_c_a_l_e_O_f_D_a_t_a_b_a_s_e function returns the name of the
  104.           locale bound to the specified database, as a null-terminated
  105.           string.  The returned locale name string is owned by Xlib
  106.           and should not be modified or freed by the client.  Xlib is
  107.           not permitted to free the string until the database is
  108.           destroyed.  Until the string is freed, it will not be
  109.           modified by Xlib.
  110.  
  111.           The _X_r_m_G_e_t_D_a_t_a_b_a_s_e function returns the database associated
  112.           with the specified display.  It returns NULL if a database
  113.           has not yet been set.
  114.  
  115.           The _X_r_m_S_e_t_D_a_t_a_b_a_s_e function associates the specified
  116.           resource database (or NULL) with the specified display.  The
  117.           database previously associated with the display (if any) is
  118.           not destroyed.  A client or toolkit may find this function
  119.           convenient for retaining a database once it is constructed.
  120.  
  121.      FFFFIIIILLLLEEEE SSSSYYYYNNNNTTTTAAAAXXXX
  122.           The syntax of a resource file is a sequence of resource
  123.           lines terminated by newline characters or the end of the
  124.           file.  The syntax of an individual resource line is:
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           ResourceLine   = Comment | IncludeFile | ResourceSpec | <empty line>
  141.           Comment        = "!" {<any character except null or newline>}
  142.           IncludeFile    = "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace
  143.           FileName       = <valid filename for operating system>
  144.           ResourceSpec   = WhiteSpace ResourceName WhiteSpace ":" WhiteSpace Value
  145.           ResourceName   = [Binding] {Component Binding} ComponentName
  146.           Binding        = "." | "*"
  147.           WhiteSpace     = {<space> | <horizontal tab>}
  148.           Component      = "?" | ComponentName
  149.           ComponentName  = NameChar {NameChar}
  150.           NameChar       = "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-"
  151.           Value          = {<any character except null or unescaped newline>}
  152.  
  153.           Elements separated by vertical bar (|) are alternatives.
  154.           Curly braces ({...}) indicate zero or more repetitions of
  155.           the enclosed elements.  Square brackets ([...]) indicate
  156.           that the enclosed element is optional.  Quotes ("...") are
  157.           used around literal characters.
  158.  
  159.           IncludeFile lines are interpreted by replacing the line with
  160.           the contents of the specified file.  The word ``include''
  161.           must be in lowercase.  The file name is interpreted relative
  162.           to the directory of the file in which the line occurs (for
  163.           example, if the file name contains no directory or contains
  164.           a relative directory specification).
  165.  
  166.           If a ResourceName contains a contiguous sequence of two or
  167.           more Binding characters, the sequence will be replaced with
  168.           single ``.'' character if the sequence contains only ``.''
  169.           characters; otherwise, the sequence will be replaced with a
  170.           single ``*'' character.
  171.  
  172.           A resource database never contains more than one entry for a
  173.           given ResourceName.  If a resource file contains multiple
  174.           lines with the same ResourceName, the last line in the file
  175.           is used.
  176.  
  177.           Any white space characters before or after the name or colon
  178.           in a ResourceSpec are ignored.  To allow a Value to begin
  179.           with white space, the two-character sequence ``\_s_p_a_c_e''
  180.           (backslash followed by space) is recognized and replaced by
  181.           a space character, and the two-character sequence ``\_t_a_b''
  182.           (backslash followed by horizontal tab) is recognized and
  183.           replaced by a horizontal tab character.  To allow a Value to
  184.           contain embedded newline characters, the two-character
  185.           sequence ``\n'' is recognized and replaced by a newline
  186.           character.  To allow a Value to be broken across multiple
  187.           lines in a text file, the two-character sequence
  188.           ``\_n_e_w_l_i_n_e'' (backslash followed by newline) is recognized
  189.           and removed from the value.  To allow a Value to contain
  190.           arbitrary character codes, the four-character sequence
  191.           ``\_n_n_n'', where each _n is a digit character in the range of
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmGGGGeeeettttFFFFiiiilllleeeeDDDDaaaattttaaaabbbbaaaasssseeee((((3333XXXX11111111))))
  203.  
  204.  
  205.  
  206.           ``0''-``7'', is recognized and replaced with a single byte
  207.           that contains the octal value specified by the sequence.
  208.           Finally, the two-character sequence ``\\'' is recognized and
  209.           replaced with a single backslash.
  210.  
  211.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  212.           XrmGetResource(3X11), XrmInitialize(3X11),
  213.           XrmPutResource(3X11)
  214.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/30/98)
  262.  
  263.  
  264.  
  265.